#ifndef MSGBOX_H
#define MSGBOX_H
#include <QHash>
#include <QLabel>
#include <QMessageBox>

class MsgBox : public QDialog
{
    Q_OBJECT

public:
    explicit MsgBox(QWidget* parent = nullptr);
    MsgBox(const QString& title, const QString& text,
           QMessageBox::StandardButtons buttons = QMessageBox::NoButton,
           QMessageBox::StandardButton default_button = QMessageBox::NoButton,
           QWidget* parent = nullptr,
           const QHash<int, QString>& button_texts = QHash<int, QString>());

    static QMessageBox::StandardButton
    warning(QWidget* parent, const QString& title, const QString& text,
            QMessageBox::StandardButtons buttons = QMessageBox::Ok,
            QMessageBox::StandardButton default_button = QMessageBox::Ok,
            const QHash<int, QString>& button_texts = QHash<int, QString>());

    static QMessageBox::StandardButton
    information(QWidget* parent, const QString& title, const QString& text,
                QMessageBox::StandardButtons buttons = QMessageBox::Ok,
                QMessageBox::StandardButton default_button = QMessageBox::NoButton,
                const QHash<int, QString>& button_texts = QHash<int, QString>());

    static QMessageBox::StandardButton
    question(QWidget* parent, const QString& title, const QString& text,
             QMessageBox::StandardButtons buttons = QMessageBox::StandardButtons(QMessageBox::Yes
                                                                                 | QMessageBox::No),
             QMessageBox::StandardButton default_button = QMessageBox::NoButton,
             const QHash<int, QString>& button_texts = QHash<int, QString>());

private:
    QLabel* text_label_;
};

#endif // MSGBOX_H
